# 导入文件
# hbase shell /home/order_info.txt

# 创建命名空间
create_namespace "zyz"
list_namespace
describe_namespace
drop_namespace

# 创建订单表 表名order_info 列簇c1
create "order_info","c1"

# 查看表
list

# 删除表（必须先禁用）
disable "order_info"
drop "order_info"

# 添加或更新数据(put 表名,rowkey,列簇:列名,值)
put "order_info","1","c1:status","已提交"

# 查看数据(get 表名,rowkey)
get "order_info","1"
get "order_info","1",{FORMATTER => 'toString'}

# 删除数据
deleteall "order_info","1","c1:status"
deleteall "order_info","1"

# 记数(非常耗时)（mapreduce.RowCounter替代）
count "order_info"

# 扫描(谨慎全表扫描)
scan "order_info",{ROWPREFIXFILTER => '56tyu', LIMIT => 3, COLUMNS => ['c1:status'], FORMATTER => 'toString'}
scan "order_info",{FILTER => "RowFilter(=,'binary:56tyu')"}   # 过滤器
scan "order_info",{FILTER => "SingleColumnValueFilter('c1','status',=,'binary:已付款')", FORMATTER => 'toString'}
scan "order_info",{FILTER => "SingleColumnValueFilter('c1','status',=,'binary:已付款') AND SingleColumnValueFilter('c1','status',=,'binary:已付款')", FORMATTER => 'toString'}

# 查看过滤器
show_filters

# 自增（INCR）
get_counter
incr

# 其他操作
status
whoami
describe
exists
enable
is_enabled
is_disabled
alter
truncate

